var FMFPdxfParserEntititiesEllipse = Class.create();
FMFPdxfParserEntititiesEllipse.prototype = {
    initialize: function () {
        this.helpers = new FMFPParseHelpers();
    },

    ForEntityName: 'ELLIPSE',

    parseEntity: function (scanner, curr) {
        var self = this;
        var entity;
        entity = { type: curr.value };
        curr = scanner.next();
        while (curr !== 'EOF') {
            if (curr.code === 0) break;

            switch (curr.code) {
                case 10:
                    entity.center = self.helpers.parsePoint(scanner);
                    break;
                case 11:
                    entity.majorAxisEndPoint = self.helpers.parsePoint(scanner);
                    break;
                case 40:
                    entity.axisRatio = curr.value;
                    break;
                case 41:
                    entity.startAngle = curr.value;
                    break;
                case 42:
                    entity.endAngle = curr.value;
                    break;
                case 2:
                    entity.name = curr.value;
                    break;
                default: // check common entity attributes
                    self.helpers.checkCommonEntityProperties(entity, curr);
                    break;
            }

            curr = scanner.next();
        }

        return entity;
    },

    type: 'FMFPdxfParserEntititiesEllipse'
};